#region Summary

// 
// Owner : JackieHan 
// 
// Solution : Jackie.Utility
// 
// Project : Jackie.Utility
// 
// File : SearchOption.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 搜索选项
// 
// History : 
//			2010-10-29 14:25:54	    Create 
// 

#endregion

#region Using

using System;
using System.Collections.Generic;

#endregion

namespace Jackie.Utility.JQuery.Grid
{
    /// <summary> 
    /// 搜索选项
    /// </summary>
    public class SearchOption
    {
        public SearchOption()
        {
            SearchOperation = SearchOperation.Equal;
            SelectOptionValue = new Dictionary<string, string>();
        }

        /// <summary>
        /// 获取下列列表中的选项的Url,只有在select下有用
        /// </summary>
        public string DataUrl { get; set; }
        /// <summary>
        /// 没有实现，function类型
        /// </summary>
        public string BuildSelectFunction { get; set; }
        /// <summary>
        /// 此方法在搜索元素创建完成时调用  dataInit:function(elem){do something}
        /// </summary>
        public string DataInitializeFunction { get; set; }
        /// <summary>
        /// 注册搜索元素的事件 注册方式为$(#id).bind(type,[data],fn)  dataEvents:[{type:"click",data:{i:7},fn:function(e){alert(e.data.i);}}]
        /// </summary>
        public IList<HtmlElementEvent> DataEvents{ get; set;}
        /// <summary>
        /// 搜索元素的属性  attr:{title:"Some Title"}
        /// </summary>
        public string ElementAttribute { get; set; }
        /// <summary>
        /// 搜索元素的默认值  defaultvalue:"AAA"
        /// </summary>
        public string DefaultValue { get; set; }
        /// <summary>
        /// 当元素类型为select，此提供下列表的值value:{1:"One";2:"Tow"}
        /// </summary>
        public IDictionary<string,string> SelectOptionValue { get; set; }

        /// <summary>
        /// 搜索类型，= > >=等等
        /// </summary>
        public SearchOperation SearchOperation { get; set; }


    }
}